﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CommonSearch;

namespace Web
{
    /// <summary>
    /// CommonSearch Demo
    /// </summary>
    public partial class Index : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
             this.InitSearch();
        }
        protected void InitSearch()
        {
            List<SearchFieldInfo> lstItem = new List<SearchFieldInfo>() { 
                new SearchFieldInfo("系统ID","id|number|text",""),
                new SearchFieldInfo("告警类型","gaoJinType|string|text",""),
                new SearchFieldInfo("地区","area|string|select","<option value='杭州'>杭州</option><option value='武汉'>武汉</option>"),
                new SearchFieldInfo("基站号","基站号|string|text",""),
                new SearchFieldInfo("基站名","基站名|string|text",""),
                new SearchFieldInfo("告警开始时间","ACStartTime|dateTime|text",""),
                new SearchFieldInfo("告警结束时间","ACEndTime|dateTime|text",""),
                new SearchFieldInfo("停电时长（小时）","停电小时数|number|text","")
            };
            this.search1.TypeList = lstItem;
            if (!string.IsNullOrEmpty(this.search1.StrSQL))
            {
                this.lbSql.Text = this.search1.StrSQL;
            }
        }
    }
}